package thread;

public class PriorityDemo {
    public static void main(String[] args) {

        Thread max = new Thread(){
            @Override
            public void run() {
                for (int i = 0; i < 10000; i++) {
                    System.out.println("================================");
                }
            }
        };

        Thread nor = new Thread(){
            @Override
            public void run() {
                for (int i = 0; i < 10000; i++) {
                    System.out.println("nor");
                }
            }
        };

        Thread min = new Thread(){
            @Override
            public void run() {
                for (int i = 0; i < 10000; i++) {
                    System.out.println("大家晚上好");
                }
            }
        };


        max.setPriority(Thread.MAX_PRIORITY);
        min.setPriority(Thread.MIN_PRIORITY);

        max.start();
        nor.start();
        min.start();
    }
}
